<?php
defined("_VALID_ACCESS") || die('Direct access forbidden');
class SCTV_Material extends Module { 
	public function body(){
  		$this->rb = $this->init_module('Utils/RecordBrowser','SCTV_Material','SCTV_Material');
		$this->rb->set_defaults(array(
			'free_ordinal'=>0,
			'ordinary_ordinal'=>0,
			'excel_free_ordinal'=>0,
			'excel_ordinary_ordinal'=>0,
			'excel_subnet_ordinal'=>0
			));	
    	$this->display_module($this->rb);
	}
  	public function material_price_addon($arg){
		$rb = $this->init_module('Utils/RecordBrowser','SCTV_MaterialPrice');
		$rb->set_defaults(array('material'=>$arg['id']));		
		$price = array(array('material'=>$arg['id']), array(), array('from_date'=>'desc'));
		$this->display_module($rb,$price,'show_data');
	}
	 public function caption(){
		if (isset($this->rb)) return $this->rb->caption();
	}
}
 
?>